home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / var / lib / dpkg / info / acpid.postinst < prev    next >
Text File  |  2008-09-25  |  995b  |  40 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. # Remove shutdown and reboot links; this init script does not need them.
  6. if dpkg --compare-versions "$2" lt "1.0.4-5ubuntu2"; then
  7.     rm -f /etc/rc0.d/K21acpid /etc/rc6.d/K21acpid
  8. fi
  9.  
  10. HAL_NEEDS_RESTARTING=no
  11. case "$1" in
  12.   configure|reconfigure)
  13.     # 
  14.     if [ -x /etc/init.d/hal ] && dpkg --compare-versions "$2" ge-nl 1.0.4-5ubuntu4 && [ -f /var/run/hald/hald.pid ]; then
  15.       HAL_NEEDS_RESTARTING=yes
  16.       invoke-rc.d hal stop
  17.     fi
  18.     ;;
  19. esac
  20.  
  21. # Automatically added by dh_installinit
  22. if [ -x "/etc/init.d/acpid" ]; then
  23.     update-rc.d acpid start 10 2 3 4 5 . stop 21 1 . >/dev/null
  24.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  25.         invoke-rc.d acpid start || exit $?
  26.     else
  27.         /etc/init.d/acpid start || exit $?
  28.     fi
  29. fi
  30. # End automatically added section
  31.  
  32.  
  33. case "$1" in
  34.   configure|reconfigure)
  35.     if [ -x /etc/init.d/hal ]  && dpkg --compare-versions "$2" ge-nl 1.0.4-5ubuntu4 && [ "$HAL_NEEDS_RESTARTING" = "yes" ]; then
  36.       invoke-rc.d hal start
  37.     fi
  38.     ;;
  39. esac
  40.